//
//  yiJianViewController.m
//  OfferJob
//
//  Created by 河南动力无限科技有限公司 on 17/7/21.
//  Copyright © 2017年 郑州动力无限科技. All rights reserved.
//

#import "yiJianViewController.h"

@interface yiJianViewController ()
@property (nonatomic,strong)UITextView* textView;
@end

@implementation yiJianViewController

- (void)viewDidLoad {
    self.title=@"建议反馈";
    [super viewDidLoad];
    self.view.backgroundColor=backgroundcolor;
    _textView=[[UITextView alloc]initWithFrame:CGRectMake(10*kAppScale, 15*kAppScale, SCREEN_WIDTH-20*kAppScale, 200*kAppScale)];
    _textView.placeholder=@"您的建议是我们成长的动力";
    _textView.backgroundColor=[UIColor whiteColor];
    [self .view addSubview: _textView];
    
    
    UIButton *nextBtn=[[UIButton alloc]initWithFrame:CGRectMake(10*kAppScale,_textView.bottom+50*kAppScale,SCREEN_WIDTH-20*kAppScale,44*kAppScale)];
    nextBtn.backgroundColor=NavCOLOR;
    [nextBtn setTitle:@"提交" forState:UIControlStateNormal];
    [nextBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    nextBtn.titleLabel.font=[UIFont systemFontOfSize:12*kAppScale];
    [nextBtn addTarget:self action:@selector(nextBtnEvent) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:nextBtn];
    
    
    
}
- (void)nextBtnEvent{


    FXTHttpRequestModel * requestModel = [[FXTHttpRequestModel alloc] init];
    requestModel.type = FXTHttpType_POST;
    requestModel.appendUrl = @"/Task/tasklist";
    NSMutableDictionary * paramDic = [NSMutableDictionary dictionary];
    [paramDic setValue:tokenn forKey:@"token"];
      [paramDic setValue:_textView.text forKey:@"info"];
    requestModel.paramDic = paramDic;
    requestModel.callback = ^(FXTHttpResponseModel * result, NSError *error){
        if (result.state ==FXTReponseCodeState_Success) {
            NSLog(@"请求的结果是%@",result.data);

             [DisplayHelper displayWarningAlert:result.alertMsg];
        }else {
            [DisplayHelper displayWarningAlert:result.alertMsg];
        }
    };
    [[FXTHttpSessionManager sharedHttpSessionManager] sendHttpRequestParam:requestModel];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
